package com.itkjb.leisurely.resource.sys.model.vo;

import com.itkjb.leisurely.core.interfaces.TreeInterfase;
import com.itkjb.leisurely.resource.sys.model.SysMenuModel;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.util.ArrayList;
import java.util.List;

/**
 * Copyright (C), 2018-2020
 *
 * @Author: lix
 * @Date: 2020-05-31 08:25
 * @Description: 系统菜单vo
 * @Version: V1.0.0
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
public class SysMenuVO extends SysMenuModel implements TreeInterfase<SysMenuVO> {

    private static final long serialVersionUID = -1025855178343281155L;

    private String label;
    /**
     * 子集
     */
    private List<SysMenuVO> children = new ArrayList<>();
    /**
     * 菜单中的按钮权限标识
     */
    private List<SysMenuPermType> permTypes = new ArrayList<>();

    /**
     * 为了前端的tree控件中需要次属性
     * @return
     */
    public String getLabel() {
        return this.getTitle();
    }
}
